{template "header.html"}

<div class="note note-danger">
    <p><a href="javascript:dr_update_cache();">{dr_lang('更改数据之后需要更新缓存之后才能生效')}</a></p>
</div>
<form action="" class="form-horizontal" method="post" name="myform" id="myform">
    <div class="table-scrollable">
        <table class="table table-striped table-bordered table-hover table-checkable dataTable">
            <thead>
            <tr class="heading">
                <th width="100"> {dr_lang('状态')}</th>
                <th width="300"> {dr_lang('名称')} / {dr_lang('目录')}</th>
                <th> {dr_lang('操作')} </th>
            </tr>
            </thead>
            <tbody>
            {loop $module $dir $t}
            <tr class="odd gradeX">
                <td>{if $t.dirname}
                    {if $t.is_install}
                    {if $t.used}
                    <span class="label label-sm label-success">{dr_lang('已启用')}</span>
                    {else}
                    <span class="label label-sm label-warning">{dr_lang('未启用')}</span>
                    {/if}
                    {else}
                    <span class="label label-sm label-danger">{dr_lang('未安装')}</span>
                    {/if}
                    {/if}
                </td>
                <td>
                    {if $t.dirname}
                    <i style="margin-left:30px" class="{dr_icon($t.icon)}"></i> {$t.name} / {$t.dirname}
                    {else}
                    <i class="{dr_icon($t.icon)}"></i> {$t.name} / {$dir}
                    {/if}
                </td>
                <td>
                    {if $ci->_is_admin_auth() && $t.dirname}
                        {if $t.is_install}

                    <label><a href="javascript:top.dr_iframe_show('{dr_lang('已审核评论')}','{dr_url($t['mid'].'/'.$t.dirname.'_comment/index')}&is_menu=1', '80%', '90%');" class="btn btn-xs green"> <i class="fa fa-comments"></i> {dr_lang('已审核评论')} </a></label>
                    <label><a href="javascript:top.dr_iframe_show('{dr_lang('待审核评论')}','{dr_url($t['mid'].'/'.$t.dirname.'_comment_verify/index')}&is_menu=1', '80%', '90%');" class="btn btn-xs red"> <i class="fa fa-edit"></i> {dr_lang('待审核评论')} </a></label>
                        <label><a href="{dr_url(APP_DIR.'/mform/edit', ['dir'=>$dir])}" class="btn btn-xs blue"> <i class="fa fa-cog"></i> {dr_lang('评论设置')} </a></label>
                        <label><a href="javascript:top.dr_iframe_show('{dr_lang('自定义字段')}','{dr_url('field/index', ['rname'=>'comment-mform-'.$dir, 'rid'=>0])}&is_menu=1', '80%', '90%');" class="btn btn-xs red"> <i class="fa fa-code"></i> {dr_lang('评论字段')} </a></label>
                        <label><a href="javascript:dr_iframe_show('code', '{dr_url(APP_DIR.'/mform/show_index', ['dir'=>$dir])}', '400px', '50%');" class="btn btn-xs dark"> <i class="fa fa-code"></i> {dr_lang('调用代码')}</a></label>

                        <label><a href="javascript:dr_load_ajax('{dr_lang('确定将此模块表单重新安装到本插件中吗？')}', '{dr_url(APP_DIR.'/mform/add', ['dir'=>$dir])}', 1);" class="btn btn-xs green"> <i class="fa fa-plus"></i> {dr_lang('重装')} </a></label>
                        <label><a href="javascript:dr_load_ajax('{dr_lang('确定将此模块表单从本插件中删除吗？')}', '{dr_url(APP_DIR.'/mform/del', ['dir'=>$dir])}', 1);" class="btn btn-xs red"> <i class="fa fa-trash"></i> {dr_lang('卸载')} </a></label>
                        {else}
                        <label><a href="javascript:dr_load_ajax('{dr_lang('确定将此模块表单安装到本插件中吗？')}', '{dr_url(APP_DIR.'/mform/add', ['dir'=>$dir])}', 1);" class="btn btn-xs blue"> <i class="fa fa-plus"></i> {dr_lang('安装')} </a></label>
                        {/if}
                    {/if}
                </td>
            </tr>
            {/loop}
            </tbody>
        </table>
    </div>
</form>

{template "footer.html"}